/**
 * Created by codeczx on 2018/4/12.
 */
public enum MemoryPolicy {
    NO_CACHE(1 << 0),
    NO_STORE(1 << 1);

    final int index;

    MemoryPolicy(int index) {
        this.index = index;
    }

    static boolean shouldReadFromMemory(int memoryPolicy) {
        return (memoryPolicy & MemoryPolicy.NO_CACHE.index) == 0;
    }
}
